import request from '@/utils/request'


// 根据班级&阶段查询最后一次测试周数
export function queryLastWeek(query) {
  return request({
    url: '/teaching/examrecord/week/last',
    method: 'get',
    params: {classesId:query.classesId,stage:query.stage}
  })
}
// 查询学生成绩记录列表
export function listExamdetails(classesId) {
  return request({
    url: '/teaching/examrecord/detail/',
    method: 'get',
    params: {"classesId":classesId}
  })
}
// 查询学生成绩记录列表
export function listExamrecord(query) {
  return request({
    url: '/teaching/examrecord/list',
    method: 'get',
    params: query
  })
}

// 查询学生成绩记录详细
export function getExamrecord(id) {
  return request({
    url: '/teaching/examrecord/' + id,
    method: 'get'
  })
}

// 新增学生成绩记录
export function addExamrecord(data) {
  return request({
    url: '/teaching/examrecord',
    method: 'post',
    data: data
  })
}

// 修改学生成绩记录
export function updateExamrecord(data) {
  return request({
    url: '/teaching/examrecord',
    method: 'put',
    data: data
  })
}

// 删除学生成绩记录
export function delExamrecord(id) {
  return request({
    url: '/teaching/examrecord/' + id,
    method: 'delete'
  })
}
